function NH = nextHopeNodeNotSender(backupPathTable,pathBetweenTwoNodes, DBSND, neighborsOfTheSender)
    NH = 0;   
    s1 = DBSND(1);
    k = length(DBSND);
    post = 1;
    post1 = 1;
    for i= 2:k
          s2  = DBSND(i);
          if s2 < s1 
              post1 = post;
              post=i;
              s1=s2;          
          end  
        NH = neighborsOfTheSender(post);
        a = length(backupPathTable);
        b = length(pathBetweenTwoNodes);
        for j = 1:a
           element = backupPathTable(j);
           if NH == element
               post = post1;
           end
        end
        for j = 1:b
           element = pathBetweenTwoNodes(j);
           if NH == element
               post = post1;
           end
        end
        
        
        
%         if find(backupPathTable, NH) | find(pathBetweenTwoNodes, NH)               
%             post = post1;
%         end
    end
end